//
//
//

#include <qthread.h>
#include <iostream>

class MyObject : public QObject {
    Q_OBJECT
public slots:
    void MySlot(void)
    {
        std::cout << "slot called" << std::endl;
    }
};

class CThread1 : public QThread {
    Q_OBJECT
public:
    void run(void) {
        std::cout << "thread 1 started" << std::endl;
        int i = 0;
        while(1) {
           msleep( 200 );
           ++i;
           if(i == 100)
              emit MySignal();
        }
    }
signals:
    void MySignal(void);
};

class CThread2 : public QThread {
    Q_OBJECT
public:
    void run(void) {
        std::cout << "thread 2 started" << std::endl;
        exec();
    }
};
